Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve null handling in poly and when generating sparse matrices #155

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

matthewwardrop
Copy link
Owner

This patch set greatly improves the generality with which the null data handling works, and should now properly remove null values even in sparse datasets.

It also resolves issues with poly whereby nan values would propagate in such a way as to make all values nan. We now instead maintain the null mask separately, and reapply.

Closes: #150

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (0f4ea0b) 100.00% compared to head (db58b80) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #155   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        50    +1     
  Lines         2713      2805   +92     
=========================================
+ Hits          2713      2805   +92     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
formulaic/materializers/pandas.py 100.00% <100.00%> (ø)
formulaic/transforms/poly.py 100.00% <100.00%> (ø)
formulaic/utils/null_handling.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matthewwardrop matthewwardrop merged commit 77cbba6 into main Sep 25, 2023
7 checks passed
@matthewwardrop matthewwardrop deleted the fix_poly branch September 25, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formulaic struggles with NAs and poly() syntax
1 participant